<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <!-- start: Meta -->
    <meta charset="utf-8">
    <title>祥安消防系统</title>
    <meta name="description" content="Bootstrap Metro Dashboard">
    <meta name="author" content="Dennis Ji">
    <meta name="keyword"
          content="Metro, Metro UI, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <!-- end: Meta -->

    <!-- start: Mobile Specific -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- end: Mobile Specific -->

    <!-- start: CSS -->
    <link id="bootstrap-style" href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
    <link id="base-style" href="css/style.css" rel="stylesheet">
    <link id="base-style-responsive" href="css/style-responsive.css"
          rel="stylesheet">
    <link
            href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext'
            rel='stylesheet' type='text/css'>
    <!-- end: CSS -->


    <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <link id="ie-style" href="css/ie.css" rel="stylesheet">
    <![endif]-->

    <!--[if IE 9]>
    <link id="ie9style" href="css/ie9.css" rel="stylesheet">
    <![endif]-->

    <!-- start: Favicon -->
    <link rel="shortcut icon" href="img/favicon.ico">
    <!-- end: Favicon -->




</head>
<body>

<!-- start: Header -->
<%@include file="header.jsp"%>
<div class="container-fluid-full" style="min-height: 1200px;">
    <div class="row-fluid">

        <!-- start: Main Menu -->
        <%@include file="mainmenu.jsp"%>
        <!-- start: Content -->
        <div id="content" class="span10">
            <ul class="breadcrumb">
                <li><i class="icon-home"></i> <a href="index.html">主页</a> <i
                        class="icon-angle-right"></i></li>
                <li><a href="#">台账单体列表</a></li>
            </ul>


            <div class="row-fluid sortable" >
                <div class="box span12">
                    <div class="box-header" data-original-title>
                        <h2>
                            <i class="halflings-icon white edit"></i><span class="break"></span>台账单体列表

                        </h2>
                    </div>

                    <div class="box-content">
                            <img src="img/u2142.png">
                            <h2>
                                台账管理：
                            </h2>

                            <form class="form-horizontal" id="formjc" method="post" action="${pageContext.request.contextPath}/whyjtask_SaveTzDt">
                                <fieldset>


                                    <div class="control-group">
                                        <label class="control-label"   style="text-align: left">*单体名称：</label>
                                        <div class="controls">
                                            <input class="input-xlarge focused"  name="tzdtName" type="text"
                                                   value="<s:property value="#tzdtName"/>" placeholder="请输入">
                                            <input type="hidden" name="company"
                                                   value="<s:property value="#company"/>">
                                        </div>
                                    </div>

                                    <div class="control-group">

                                        <table class="table table-striped table-bordered bootstrap-datatable" id="table1">
                                            <thead>
                                            <tr>
                                                <th>材料名称</th>
                                                <th>选择</th>


                                            </tr>
                                            </thead>
                                            <tbody>


                                            <s:iterator id="jc" value="#tzList" var="jc" status="st">

                                                <tr>
                                                    <td>
                                                        <input type="hidden" id="<s:property value="#jc.tzName"/>"
                                                               name="WhyjtzList[${st.index}].tzName"
                                                               value="<s:property value="#jc.tzName"/>"><s:property value="#jc.tzName"/>
                                                    </td>

                                                    <td>
                                                        <input type="checkbox" id="1"
                                                               name="WhyjtzList[${st.index}].ischecked"
                                                               value="1" >
                                                        <input type="hidden" name="WhyjtzList[${st.index}].tzContext"
                                                               value="<s:property value="#jc.tzContext"/>">
                                                        <input type="hidden" name="WhyjtzList[${st.index}].CompanyName"
                                                               value="<s:property value="#jc.CompanyName"/>">
                                                        <input type="hidden" name="WhyjtzList[${st.index}].tzdtName"
                                                               value="<s:property value="#jc.tzdtName"/>">
                                                    </td>

                                                        <%--<td>--%>
                                                        <%--<input type="hidden" class="input-small"  name="WhyjtzList[${st.index}].tzModel" >--%>
                                                        <%--</td>--%>
                                                        <%--<td>--%>
                                                        <%--<input type="hidden"  class="input-small" name="WhyjtzList[${st.index}].tzCj" >--%>
                                                        <%--</td>--%>
                                                        <%--<td>--%>
                                                        <%--<input type="hidden"  class="input-small" name="WhyjtzList[${st.index}].tzCount" >--%>
                                                        <%--</td>--%>
                                                        <%--<td>--%>
                                                        <%--<select hidden id="ja<s:property value="#jc.id"/>" name="WhyjtzList[${st.index}].tzType" >--%>
                                                        <%--<option <s:if test="'月检测' == #jc.tzType">selected</s:if>>月检测</option>--%>
                                                        <%--<option <s:if test="'季度检测' == #jc.tzType">selected</s:if>>季度检测</option>--%>
                                                        <%--<option <s:if test="'年检测' == #jc.tzType">selected</s:if>>年检测</option>--%>
                                                        <%--</select>--%>
                                                        <%----%>
                                                        <%----%>
                                                        <%--</td>--%>
                                                        <%--<td>--%>
                                                        <%--<input type="hidden" class="input-small datepicker" id="<s:property value="#jc.id"/>"--%>
                                                        <%--name="WhyjtzList[${st.index}].tzLastTime">--%>
                                                        <%--</td>--%>
                                                </tr>
                                            </s:iterator>


                                            </tbody>

                                        </table>

                                    </div>
                                </fieldset>
                                <div class="form-actions">
                                    <button class="btn btn-primary" onclick="checkForm1()">保存</button>
                                    <button class="btn">关闭</button>
                                </div>
                            </form>


                    </div>
                </div>
                <!--/span-->

            </div>

        </div>
        <!--/.fluid-container-->

        <!-- end: Content -->
    </div>
    <!--/#content.span10-->
</div>
<!--/fluid-row-->

<%@include file="footer.jsp"%>

<!-- start: JavaScript-->

<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery-migrate-1.0.0.min.js"></script>

<script src="js/jquery-ui-1.10.0.custom.min.js"></script>

<script src="js/jquery.ui.touch-punch.js"></script>

<script src="js/modernizr.js"></script>

<script src="js/bootstrap.min.js"></script>

<script src="js/jquery.cookie.js"></script>

<script src='js/fullcalendar.min.js'></script>

<script src='js/jquery.dataTables.min.js'></script>

<script src="js/excanvas.js"></script>
<script src="js/jquery.flot.js"></script>
<script src="js/jquery.flot.pie.js"></script>
<script src="js/jquery.flot.stack.js"></script>
<script src="js/jquery.flot.resize.min.js"></script>

<script src="js/jquery.chosen.min.js"></script>

<script src="js/jquery.uniform.min.js"></script>

<script src="js/jquery.cleditor.min.js"></script>

<script src="js/jquery.noty.js"></script>

<script src="js/jquery.elfinder.min.js"></script>

<script src="js/jquery.raty.min.js"></script>

<script src="js/jquery.iphone.toggle.js"></script>

<script src="js/jquery.uploadify-3.1.min.js"></script>

<script src="js/jquery.gritter.min.js"></script>

<script src="js/jquery.imagesloaded.js"></script>

<script src="js/jquery.masonry.min.js"></script>

<script src="js/jquery.knob.modified.js"></script>

<script src="js/jquery.sparkline.min.js"></script>

<script src="js/counter.js"></script>

<script src="js/retina.js"></script>

<script src="js/custom.js"></script>

<script>
    function checkForm1()
    {
        var t1 = document.getElementById("formjc").getElementsByTagName("input");

//        var t2 = document.getElementById("table1").getElementsByTagName("TR");

//        var tddtName = $("")
        for(i=0;i<t1.length;i++)
        {
            if(t1[i].type == "checkbox")
            {
                if(!(t1[i].checked))
                {
                    t1[i].checked = true;
                    t1[i].value = "0";
                }
            }
        }

//        for(i=0;i<t2.length;i++)
//        {
//
//        }



        $("#formjc").submit();
        return true;
    }
</script>

<!-- end: JavaScript-->



</body>
</html>